/***************************************************************************
 *   Copyright (C) 2009 by Bernhard Neuhofer   *
 *   mail@bneu.at   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef SMOUTPUT_H
#define SMOUTPUT_H
/**
* @brief Container for the statistics concerning the simulation. LPs of the SM
* update it during the simulation run
*/
class SmOutput
{
	private:
		/** Counts calls to the <code>doStep</code> methods of the SMs/Lps */
		int _steps;

		/** Counts rollbacks */
		int _rollbacks;

		/** Counts antimessages*/
		int _antimessage;

		/** counts sent messages*/
		int _sent;

		/** counts received messages*/
		int _received;

		/** counts received message */
		int _noops;

	public:
		/**
		 * Returns the antimessages.
		 * @return int
		 */
		int getAntiMessages()
		{
			return _antimessage;
		}

		/**
		 * Returns the noops
		 * @return int
		 */
		int getNoops()
		{
			return _noops;
		}

		/**
		 * Returns the received messages
		 * @return int
		 */
		int getReceived()
		{
			return _received;
		}

		/**
		 * Returns the rollbacks
		 * @return
		 */
		int getRollbacks()
		{
			return _rollbacks;
		}

		/**
		 * Returns the number of sent messages
		 * @return int
		 */
		int getSent()
		{
			return _sent;
		}



/**
 * Returns the number of steps
 * @return int
 */
int getSteps()
{
return _steps;
}

/**
 * Sets the number of antimessages
 * @param antimessage 
 */
void setAntiMessages(int antimessage)
{
_antimessage=antimessage;
}

/**
 * Sets the number of noobs
 * @param noops 
 */
void setNoops(int noops)
{
_noops=noops;
}


/**
 * Set the number of received messages
 * @param received 
 */
void setReceived(int received)
{
_received=received;
}


/**
 * Set the number of rollbacks.
 * @param rollbacks 
 */
void setRollbacks(int rollbacks)
{
_rollbacks=rollbacks;
}

/**
 * Set the number of sent messages
 * @param sent 
 */
void setSent(int sent)
{
_sent=sent;
}

/**
 * Set the number of steps
 * @param steps 
 */
void setSteps(int steps)
{
_steps=steps;
}


/**
 * Increments the number of Steps
 */
void incSteps()
{
_steps++;
}


/**
 * Increments the number of rollbacks
 */
void incRollbacks()
{
_rollbacks++;
}

/**
 * Increments the number of antimessages
 */
void incAntiMessages()
{
_antimessage++;
}


/**
 * Increments the number of sent messages
 */
void incSent()
{
_sent++;
}


/**
 * Increments the number of received messages
 */
void incReceived()
{
_received++;
}


/**
 * Increments the number of noops
 */
void incNoops()
{
_noops++;
}

};


#endif
